#!/usr/bin/env python
# -*- coding:utf-8 -*-
from django.conf.urls.defaults import url

from blog_app.mysqldb.user import *
from blog_yzw.view import loginview, indexview, blogview, userview, upload

urlpatterns = [
	# 首页
	url(r'^index$', indexview.index),
	url(r'^index_blog_list$', indexview.index_blog_list),
	url(r'^index_blog_details$', indexview.index_blog_details),

	# 博客
	url(r'^blog/turn_blog_list$', blogview.blog_list),
	url(r'^blog/turn_blog_classify$', blogview.blog_classify),
	url(r'^blog/add_classify$', blogview.add_classify),
	url(r'^blog/load_blog_classify$', blogview.load_blog_classify),
	url(r'^blog/load_classify_table$', blogview.load_classify_table_data),
	url(r'^blog/add_blog_content$', blogview.add_blog_content),
	url(r'^blog/blog_list_data$', blogview.load_blog_data),
	url(r'^blog/del_blog$', blogview.del_blog),
	url(r'^blog/del_classify$', blogview.del_classify),

	# 上传
	url(r'^upload/blog_upload_img$', upload.upload_img),

	# 登录
	url(r'^login$', loginview.turn_login),
	url(r'^handle_login$', loginview.handle_login),

	# 跳转注册
	url(r'^register$', loginview.turn_register),
	# 注册
	url(r'^handle_register$', userview.user_register),

	# 登出
	url(r'^logout$', loginview.logout),

	# 登录成功的首页
	url(r'^backstage_index$', indexview.backstage_index),
	url(r'^menu_index$', indexview.menu_index),

	# 用户
	url(r'^user/turn_user_list', userview.turn_user_list),
	url(r'^user/load_user_data', userview.load_user_data),
]
